package com.hhf.rpc.core.registry;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @Author hhf
 * @Date 2024/10/15
 * @Description 本地注册服务
 */
public class LocalRegistry {


    private static final Map<String,Class<?>> map =new ConcurrentHashMap<>();

    public static void register(String serviceName,Class<?> implClass){
        map.put(serviceName,implClass);
    }


     public static Class<?> get(String serviceName){
        return map.get(serviceName);
     }

    public static void remove(String serviceName){
        map.remove(serviceName);
    }

}
